if(window.navigator.userAgent.indexOf("Firefox")>=1)//如果浏览器为Firefox 
{	
	document.oncontextmenu=function(e){return   false;} //禁止ff复制
}
//if (window.Event) 
//	document.captureEvents(Event.MOUSEUP); 
 
function nocontextmenu() 
{
	if(window.navigator.userAgent.indexOf("Firefox")>=1)//如果浏览器为Firefox 
	{

	}else{
	 event.cancelBubble = true
	 event.returnValue = false;
	}
	return false;
}
 
function norightclick(e) 
{
	if (window.Event) 
	{
		if(e){
			if (e.which == 2 || e.which == 3){
				return false;
			}
		}
	}
	else if (event.button == 2 || event.button == 3)
	{
   		event.cancelBubble = true
   		event.returnValue = false;
   		return false;
	}
}
 
document.oncontextmenu = nocontextmenu;  // for IE5+
document.onmousedown = norightclick;  // for all others
